package org.shiki.hrm.constant;

public enum CourseLevel {
	BRZONE(1L, "青铜"),
	GOLD(2L ,"黄金"),
	SLIVER(3L, "白银"),
	PLATINUM(4L, "铂金");

	private Long gradeId;
	private String gradeName;

	public static CourseLevel checkGrade(Long id, String name){
		CourseLevel[] levels = CourseLevel.values();
		for (CourseLevel level: levels) {
			if (level.getGradeId().equals(id) && level.getGradeName().equals(name)){
				return level;
			}
		}
		return null;
	}

	CourseLevel(Long gradeId, String gradeName) {
		this.gradeId = gradeId;
		this.gradeName = gradeName;
	}

	public Long getGradeId() {
		return gradeId;
	}

	public void setGradeId(Long gradeId) {
		this.gradeId = gradeId;
	}

	public String getGradeName() {
		return gradeName;
	}

	public void setGradeName(String gradeName) {
		this.gradeName = gradeName;
	}
}
